<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>viewport特性 | 你好,欢迎来到MyNote</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../../lesson/viewport/20170815.html" />
    
    
    <link rel="prev" href="../../lesson/viewport/20170814.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="3.2.1"
        data-chapter-title="viewport特性"
        data-filepath="lesson/viewport/20170814-1.md"
        data-basepath="../.."
        data-revision="Thu Aug 31 2017 12:00:31 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        Introduction
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="lesson/html/HTML.html">
            
                
                    <a href="../../lesson/html/HTML.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        一.HTML
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="lesson/html/20170718.html">
            
                
                    <a href="../../lesson/html/20170718.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        第一节课
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.1" data-path="lesson/html/0718-3.html">
            
                
                    <a href="../../lesson/html/0718-3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.1.</b>
                        
                        a标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.2" data-path="lesson/html/0718-2.html">
            
                
                    <a href="../../lesson/html/0718-2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.2.</b>
                        
                        注释标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.3" data-path="lesson/html/0718-1.html">
            
                
                    <a href="../../lesson/html/0718-1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.3.</b>
                        
                        块级和行内元素
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="lesson/html/20170719.html">
            
                
                    <a href="../../lesson/html/20170719.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        第二节课
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="lesson/html/0719-3.html">
            
                
                    <a href="../../lesson/html/0719-3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.1.</b>
                        
                        实体字符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="lesson/html/0719-4.html">
            
                
                    <a href="../../lesson/html/0719-4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.2.</b>
                        
                        文本格式化
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="lesson/html/0719-1.html">
            
                
                    <a href="../../lesson/html/0719-1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.3.</b>
                        
                        audio音频标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="lesson/html/0719-2.html">
            
                
                    <a href="../../lesson/html/0719-2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.4.</b>
                        
                        video音频标签
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="lesson/html/20170720.html">
            
                
                    <a href="../../lesson/html/20170720.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        第三节课
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="lesson/html/input.html">
            
                
                    <a href="../../lesson/html/input.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.1.</b>
                        
                        课后补充
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="lesson/html/0720-1.html">
            
                
                    <a href="../../lesson/html/0720-1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.2.</b>
                        
                        HTML表格
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="lesson/html/0720-2.html">
            
                
                    <a href="../../lesson/html/0720-2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.3.</b>
                        
                        form表单
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="lesson/html/20170721.html">
            
                
                    <a href="../../lesson/html/20170721.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.</b>
                        
                        第四节课
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="lesson/html/0721-5.html">
            
                
                    <a href="../../lesson/html/0721-5.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.1.</b>
                        
                        icon
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="lesson/html/0721-2.html">
            
                
                    <a href="../../lesson/html/0721-2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.2.</b>
                        
                        自定义列表
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="lesson/html/0721-3.html">
            
                
                    <a href="../../lesson/html/0721-3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.3.</b>
                        
                        iframe内嵌框架
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="lesson/html/0721-4.html">
            
                
                    <a href="../../lesson/html/0721-4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.4.</b>
                        
                        H5的语义化标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="lesson/html/0721-1.html">
            
                
                    <a href="../../lesson/html/0721-1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.5.</b>
                        
                        图片的热区hotmap
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="lesson/css/CSS.html">
            
                
                    <a href="../../lesson/css/CSS.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        二.CSS
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="lesson/css/20170724.html">
            
                
                    <a href="../../lesson/css/20170724.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        第一节课
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1.1" data-path="lesson/css/0724-1.html">
            
                
                    <a href="../../lesson/css/0724-1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.1.</b>
                        
                        元素选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.2" data-path="lesson/css/0724-3.html">
            
                
                    <a href="../../lesson/css/0724-3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.2.</b>
                        
                        ID选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.3" data-path="lesson/css/0724-4.html">
            
                
                    <a href="../../lesson/css/0724-4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.3.</b>
                        
                        关系选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.4" data-path="lesson/css/0724-5.html">
            
                
                    <a href="../../lesson/css/0724-5.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.4.</b>
                        
                        伪类选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.5" data-path="lesson/css/扩展.html">
            
                
                    <a href="../../lesson/css/扩展.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.5.</b>
                        
                        属性选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.6" data-path="lesson/css/扩展2.html">
            
                
                    <a href="../../lesson/css/扩展2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.6.</b>
                        
                        伪元素选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.7" data-path="lesson/css/0724-2.html">
            
                
                    <a href="../../lesson/css/0724-2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.7.</b>
                        
                        class类选择器
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="lesson/css/20170725.html">
            
                
                    <a href="../../lesson/css/20170725.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        第二节课
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.1" data-path="lesson/css/0725-1.html">
            
                
                    <a href="../../lesson/css/0725-1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.1.</b>
                        
                        字体样式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.2" data-path="lesson/css/0725-2.html">
            
                
                    <a href="../../lesson/css/0725-2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.2.</b>
                        
                        文本描述
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.3" data-path="lesson/css/0725-3.html">
            
                
                    <a href="../../lesson/css/0725-3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.3.</b>
                        
                        文字阴影
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.4" data-path="lesson/css/0725-4.html">
            
                
                    <a href="../../lesson/css/0725-4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.4.</b>
                        
                        字体嵌入
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.5" data-path="lesson/css/0725-5.html">
            
                
                    <a href="../../lesson/css/0725-5.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.5.</b>
                        
                        CSS颜色
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="lesson/css/20170726.html">
            
                
                    <a href="../../lesson/css/20170726.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        第三节课
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.3.1" data-path="lesson/css/0726-1.html">
            
                
                    <a href="../../lesson/css/0726-1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.1.</b>
                        
                        border边框
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3.2" data-path="lesson/css/0726-2.html">
            
                
                    <a href="../../lesson/css/0726-2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.2.</b>
                        
                        background背景
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="lesson/css/20170727.html">
            
                
                    <a href="../../lesson/css/20170727.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.</b>
                        
                        第四节课
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.4.1" data-path="lesson/css/0727-2.html">
            
                
                    <a href="../../lesson/css/0727-2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.1.</b>
                        
                        文字溢出
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4.2" data-path="lesson/css/0727-3.html">
            
                
                    <a href="../../lesson/css/0727-3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.2.</b>
                        
                        word-break
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4.3" data-path="lesson/css/0727-1.html">
            
                
                    <a href="../../lesson/css/0727-1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.3.</b>
                        
                        文字对齐方式
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="lesson/css/20170728.html">
            
                
                    <a href="../../lesson/css/20170728.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.</b>
                        
                        第五节课
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.5.1" data-path="lesson/css/0728-1.html">
            
                
                    <a href="../../lesson/css/0728-1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.1.</b>
                        
                        定位
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.5.2" data-path="lesson/css/0728-2.html">
            
                
                    <a href="../../lesson/css/0728-2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.2.</b>
                        
                        z-index
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.6" data-path="lesson/css/20170731.html">
            
                
                    <a href="../../lesson/css/20170731.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.6.</b>
                        
                        第六节课
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.7" data-path="lesson/css/20170801.html">
            
                
                    <a href="../../lesson/css/20170801.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.7.</b>
                        
                        第七节课
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.7.1" data-path="lesson/css/0801-2.html">
            
                
                    <a href="../../lesson/css/0801-2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.7.1.</b>
                        
                        git安装使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.7.2" data-path="lesson/css/0801-1.html">
            
                
                    <a href="../../lesson/css/0801-1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.7.2.</b>
                        
                        SASS安装使用
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.8" data-path="lesson/css/20170802.html">
            
                
                    <a href="../../lesson/css/20170802.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.8.</b>
                        
                        第八节课
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.8.1" data-path="lesson/css/0802-1.html">
            
                
                    <a href="../../lesson/css/0802-1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.8.1.</b>
                        
                        css3 过渡（transition）
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.8.2" data-path="lesson/css/0802-2.html">
            
                
                    <a href="../../lesson/css/0802-2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.8.2.</b>
                        
                        css3 变换（transform）
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.9" data-path="lesson/css/20170803.html">
            
                
                    <a href="../../lesson/css/20170803.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.9.</b>
                        
                        第九节课
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.10" data-path="lesson/css/20170804.html">
            
                
                    <a href="../../lesson/css/20170804.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.10.</b>
                        
                        第十节课
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.10.1" data-path="lesson/css/0804-1.html">
            
                
                    <a href="../../lesson/css/0804-1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.10.1.</b>
                        
                        滤镜
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="lesson/media/media.html">
            
                
                    <a href="../../lesson/media/media.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        三.项目期间
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="lesson/css/20170807.html">
            
                
                    <a href="../../lesson/css/20170807.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        鲁班项目(第一天)
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1.1" data-path="lesson/css/20170808.html">
            
                
                    <a href="../../lesson/css/20170808.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.1.</b>
                        
                        鲁班项目(第二天)
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.1.2" data-path="lesson/css/20170809.html">
            
                
                    <a href="../../lesson/css/20170809.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.2.</b>
                        
                        鲁班项目(第三天)
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.1.3" data-path="lesson/css/20170811.html">
            
                
                    <a href="../../lesson/css/20170811.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.3.</b>
                        
                        鲁班项目(第四天)
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="lesson/viewport/20170814.html">
            
                
                    <a href="../../lesson/viewport/20170814.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        viewport
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="3.2.1" data-path="lesson/viewport/20170814-1.html">
            
                
                    <a href="../../lesson/viewport/20170814-1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.1.</b>
                        
                        viewport特性
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="lesson/viewport/20170815.html">
            
                
                    <a href="../../lesson/viewport/20170815.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.</b>
                        
                        移动端项目
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.3.1" data-path="lesson/viewport/20170816.html">
            
                
                    <a href="../../lesson/viewport/20170816.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.1.</b>
                        
                        倒霉
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.3.1.1" data-path="lesson/viewport/0816-1.html">
            
                
                    <a href="../../lesson/viewport/0816-1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.1.1.</b>
                        
                        css长度单位
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.3.2" data-path="lesson/mobile-project/20170817project.html">
            
                
                    <a href="../../lesson/mobile-project/20170817project.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.2.</b>
                        
                        mobile项目入手
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3.3" data-path="lesson/mobile-project/20170818.html">
            
                
                    <a href="../../lesson/mobile-project/20170818.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.3.</b>
                        
                        记录
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3.4" data-path="lesson/viewport/20170821.html">
            
                
                    <a href="../../lesson/viewport/20170821.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.4.</b>
                        
                        项目中所遇的问题
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3.5" data-path="lesson/viewport/20170822.html">
            
                
                    <a href="../../lesson/viewport/20170822.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.5.</b>
                        
                        当日总结
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3.6" data-path="lesson/viewport/20170823.html">
            
                
                    <a href="../../lesson/viewport/20170823.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.6.</b>
                        
                        上交测试版
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3.7" data-path="lesson/viewport/20170824.html">
            
                
                    <a href="../../lesson/viewport/20170824.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.7.</b>
                        
                        当日总结
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="lesson/css/20170830.html">
            
                
                    <a href="../../lesson/css/20170830.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.4.</b>
                        
                        接触框架
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.5" data-path="lesson/css/20170831.html">
            
                
                    <a href="../../lesson/css/20170831.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.5.</b>
                        
                        语法与规则 Rules
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../" >你好,欢迎来到MyNote</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h2 id="&#x89C6;&#x53E3;viewport&#x7279;&#x6027;">&#x89C6;&#x53E3;viewport&#x7279;&#x6027;</h2>
<pre><code>&#x901A;&#x5E38;&#x60C5;&#x51B5;&#x4E0B;&#xFF0C;viewport&#x6709;&#x4EE5;&#x4E0B;6&#x79CD;&#x8BBE;&#x7F6E;&#x3002;&#x5F53;&#x7136;&#x5382;&#x5546;&#x53EF;&#x80FD;&#x4F1A;&#x589E;&#x52A0;&#x4E00;&#x4E9B;&#x7279;&#x5B9A;&#x7684;&#x8BBE;&#x7F6E;&#xFF0C;&#x6BD4;&#x5982;iOS Safari7.1&#x589E;&#x52A0;&#x4E86;&#x4E00;&#x79CD;&#x5728;&#x7F51;&#x9875;&#x52A0;&#x8F7D;&#x65F6;&#x9690;&#x85CF;&#x5730;&#x5740;&#x680F;&#x4E0E;&#x5BFC;&#x822A;&#x680F;&#x7684;&#x8BBE;&#x7F6E;&#xFF1A;minimal-ui&#xFF0C;&#x4E0D;&#x8FC7;&#x968F;&#x540E;&#x53C8;&#x5C06;&#x4E4B;&#x79FB;&#x9664;&#x4E86;&#x3002;
</code></pre><table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">V&#x503C;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">width</td>
<td style="text-align:left">&#x6B63;&#x6574;&#x6570;&#x6216;device-width</td>
<td style="text-align:left">&#x5B9A;&#x4E49;&#x89C6;&#x53E3;&#x7684;&#x5BBD;&#x5EA6;&#xFF0C;&#x5355;&#x4F4D;&#x4E3A;&#x50CF;&#x7D20;</td>
</tr>
<tr>
<td style="text-align:left">height</td>
<td style="text-align:left">&#x6B63;&#x6574;&#x6570;&#x6216;device-height</td>
<td style="text-align:left">&#x5B9A;&#x4E49;&#x89C6;&#x53E3;&#x7684;&#x9AD8;&#x5EA6;&#xFF0C;&#x5355;&#x4F4D;&#x4E3A;&#x50CF;&#x7D20;</td>
</tr>
<tr>
<td style="text-align:left">initial-scale</td>
<td style="text-align:left">[0.0-10.0]</td>
<td style="text-align:left">&#x5B9A;&#x4E49;&#x521D;&#x59CB;&#x7F29;&#x653E;&#x503C;</td>
</tr>
<tr>
<td style="text-align:left">minimum-scale</td>
<td style="text-align:left">[0.0-10.0]</td>
<td style="text-align:left">&#x5B9A;&#x4E49;&#x7F29;&#x5C0F;&#x6700;&#x5C0F;&#x6BD4;&#x4F8B;&#xFF0C;&#x5B83;&#x5FC5;&#x987B;&#x5C0F;&#x4E8E;&#x6216;&#x7B49;&#x4E8E;maximum-scale&#x8BBE;&#x7F6E;</td>
</tr>
<tr>
<td style="text-align:left">maximum-scale</td>
<td style="text-align:left">[0.0-10.0]</td>
<td style="text-align:left">&#x5B9A;&#x4E49;&#x653E;&#x5927;&#x6700;&#x5927;&#x6BD4;&#x4F8B;&#xFF0C;&#x5B83;&#x5FC5;&#x987B;&#x5927;&#x4E8E;&#x6216;&#x7B49;&#x4E8E;minimum-scale&#x8BBE;&#x7F6E;</td>
</tr>
<tr>
<td style="text-align:left">user-scalable</td>
<td style="text-align:left">yes/no</td>
<td style="text-align:left">&#x5B9A;&#x4E49;&#x662F;&#x5426;&#x5141;&#x8BB8;&#x7528;&#x6237;&#x624B;&#x52A8;&#x7F29;&#x653E;&#x9875;&#x9762;&#xFF0C;&#x9ED8;&#x8BA4;&#x503C;yes</td>
</tr>
</tbody>
</table>
<h3 id="&#x624B;&#x673A;&#x89C6;&#x53E3;">&#x624B;&#x673A;&#x89C6;&#x53E3;</h3>
<p><strong>&#x4F7F;&#x7528;js&#x6765;&#x68C0;&#x6D4B;&#x5C4F;&#x5E55;&#x89C6;&#x53E3;&#x7684;&#x5BBD;&#x5EA6;</strong><br><code>document.documentElement.clientWidth&#xFF1B;</code><br>    &#x4F7F;&#x7528;&#x624B;&#x673A;&#x6267;&#x884C;&#x8FD9;&#x6BB5;&#x4EE3;&#x7801;&#xFF0C;&#x53D1;&#x73B0;&#x4E0D;&#x7BA1;&#x662F;&#x4EC0;&#x4E48;&#x624B;&#x673A;&#xFF0C;&#x5927;&#x5C4F;&#x5C0F;&#x5C4F;&#xFF0C;&#x5BBD;&#x5EA6;&#x90FD;&#x662F;980px<br>    &#x7535;&#x8111;&#xFF1A;&#x5206;&#x8FA8;&#x7387; = &#x89C6;&#x53E3;&#x5BBD;&#x5EA6;<br>    &#x4F46;&#x662F;&#xFF0C;&#x624B;&#x673A;&#x7684;&#x5206;&#x8FA8;&#x7387;&#x8FDC;&#x8FDC;&#x5927;&#x4E8E;980&#xFF0C;&#x6BD4;&#x5982;iPhone6p &#x5206;&#x8FA8;&#x7387;&#x662F;&#xFF1A;1240 * 2208<br>    &#x6309;&#x9053;&#x7406;&#x8BF4;&#x624B;&#x673A;&#x89C6;&#x53E3;&#x5E94;&#x8BE5;&#x662F;1242&#x624D;&#x5BF9;<br>    980&#x662F;viewport&#x7684;&#x5BBD;&#x5EA6;&#xFF0C;viewport&#x5C31;&#x662F;&#x89C6;&#x53E3;<br>    980&#x662F;&#x4EBA;&#x4E3A;&#x5B9A;&#x7684;&#xFF0C;&#x8FD9;&#x4E2A;&#x662F;&#x4E54;&#x5E2E;&#x4E3B;&#xFF08;&#x4E54;&#x5E03;&#x65AF;&#xFF09;&#x5B9A;&#x7684;980&#x8FD9;&#x4E2A;&#x6570;&#x5B57;<br>    &#x603B;&#x7ED3;&#xFF1A;980&#x662F;&#x4EBA;&#x4E3A;&#x89C4;&#x5B9A;&#x7684;&#x5BBD;&#x5EA6;&#xFF0C;&#x53EB;&#x505A;&#x89C6;&#x53E3;&#x5BBD;&#x5EA6;&#xFF0C;&#x6240;&#x6709;&#x624B;&#x673A;&#x7684;&#x9ED8;&#x8BA4;&#x89C6;&#x53E3;&#x5BBD;&#x5EA6;&#x90FD;&#x662F;980px&#xFF0C;&#x5982;&#x679C;&#x4F7F;&#x7528;&#x624B;&#x673A;&#x6D4F;&#x89C8;&#x6CA1;&#x6709;&#x4F18;&#x5316;&#x7684;&#x7535;&#x8111;&#x7F51;&#x9875;&#xFF0C;&#x5C06;&#x4F1A;&#x975E;&#x5E38;&#x65B9;&#x4FBF;<br>    &#x4F46;&#x662F;&#xFF1A;&#x95EE;&#x9898;&#x6765;&#x4E86;&#xFF0C;&#x5982;&#x679C;&#x6211;&#x53D1;&#x5E03;&#x7684;&#x9875;&#x9762;&#x4E13;&#x95E8;&#x7528;&#x4E8E;&#x624B;&#x673A;&#x8BBF;&#x95EE;&#xFF0C;&#x90A3;&#x4E48;980&#x592A;&#x5BBD;&#x4E86;&#xFF0C;&#x91CC;&#x8FB9;&#x88C5;&#x7684;&#x4E1C;&#x897F;&#x592A;&#x591A;&#xFF0C;&#x6211;&#x4EEC;&#x5E0C;&#x671B;&#x4F7F;&#x7528;&#x624B;&#x673A;&#x5C4F;&#x5E55;&#x771F;&#x5B9E;&#x5BBD;&#x5EA6;&#x4F5C;&#x4E3A;&#x89C6;&#x53E3;&#x5BBD;&#x5EA6;    </p>
<pre><code class="lang-html">        &#x73B0;&#x5728;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x7EA6;&#x675F;&#x89C6;&#x53E3;&#xFF0C;&#x6253;&#x5230;&#x6211;&#x4EEC;&#x7684;&#x8981;&#x6C42;
               <span class="hljs-tag">&lt;<span class="hljs-title">meta</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">&apos;viewport&apos;</span> <span class="hljs-attribute">contant</span>=<span class="hljs-value">&apos;width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scaleable=no&apos;</span>&gt;</span>
               width = device-width&#xFF1A;&#x89C6;&#x53E3;&#x5BBD;&#x5EA6;&#x7EA6;&#x675F;&#x5230;&#x624B;&#x673A;&#x8BBE;&#x5907;&#x5BBD;&#x5EA6;
               initial-scale&#xFF1A;&#x9ED8;&#x8BA4;&#x521D;&#x59CB;&#x7F29;&#x653E;&#x6BD4;&#x4F8B;
               maximum-scale&#xFF1A;&#x6700;&#x5927;&#x53EF;&#x7F29;&#x653E;&#x6BD4;&#x4F8B;
               minimum-scale&#xFF1A;&#x6700;&#x5C0F;&#x53EF;&#x7F29;&#x653E;&#x6BD4;&#x4F8B;
               user-scaleable&#xFF1A;&#x7528;&#x6237;&#x662F;&#x5426;&#x53EF;&#x7F29;&#x653E;
               &#x8FD9;&#x4E2A;meta&#x6807;&#x7B7E;&#xFF0C;&#x5C31;&#x662F;&#x505A;&#x7684;&#x89C6;&#x53E3;&#x7EA6;&#x675F;&#xFF0C;&#x7EA6;&#x675F;&#x4E4B;&#x540E;&#x7684;&#x89C6;&#x53E3;&#x5BBD;&#x5EA6;&#xFF0C;&#x548C;&#x8BBE;&#x5907;&#x5BBD;&#x5EA6;&#x76F8;&#x540C;&#xFF0C;&#x5176;&#x5B9E;&#x8FD9;&#x4E2A;&#x6570;&#x5B57;&#x4E5F;&#x662F;&#x4EBA;&#x4E3A;&#x8BBE;&#x7F6E;&#x7684;&#xFF0C;&#x6BCF;&#x4E2A;&#x8BBE;&#x5907;&#x51FA;&#x5382;&#x90FD;&#x4F1A;&#x5236;&#x5B9A;&#x4E00;&#x4E2A;&#x7EA6;&#x675F;&#x89C6;&#x53E3;&#x7684;&#x5BBD;&#x5EA6;
               &#x7EA6;&#x675F;&#x4E4B;&#x540E;&#x7684;&#x89C6;&#x53E3;&#x4E0D;&#x662F;&#x81EA;&#x5DF1;&#x7684;&#x5206;&#x8FA8;&#x7387;
               &#x5F53;&#x7136;&#x4F5C;&#x4E3A;&#x524D;&#x6BB5;&#x5DE5;&#x7A0B;&#x5F00;&#x53D1;&#x5DE5;&#x7A0B;&#x5E08;&#xFF0C;&#x6211;&#x4EEC;&#x4E0D;&#x5173;&#x5FC3;&#x5206;&#x8FA8;&#x7387;&#xFF0C;&#x6211;&#x4EEC;&#x53EA;&#x5173;&#x5FC3;&#x89C6;&#x53E3;&#x5BBD;&#x5EA6;
               &#x89C6;&#x53E3;&#x8D8A;&#x5C0F;&#xFF0C;&#x5B57;&#x8D8A;&#x5927;&#xFF0C;&#x7EA6;&#x675F;&#x4E4B;&#x540E;&#x7684;&#x89C6;&#x53E3;&#x4E00;&#x822C;&#x5728;320 - 480&#x4E4B;&#x95F4;&#xFF0C;&#x8FD9;&#x4E2A;&#x5BBD;&#x5EA6;&#x5B57;&#x8DB3;&#x591F;&#x5C0F;&#xFF0C;&#x770B;&#x8D77;&#x6765;&#x6BD4;&#x8F83;&#x6E05;&#x6670;&#xFF0C;&#x6BD4;&#x8F83;&#x5408;&#x9002;
</code></pre>
<p><strong>&#x6D41;&#x5F0F;&#x5E03;&#x5C40;</strong></p>
<pre><code class="lang-html">1&#xFF0C;&#x624B;&#x673A;&#x7F51;&#x9875;&#x6CA1;&#x6709;&#x7248;&#x5FC3;&#xFF0C;&#x4E24;&#x8FB9;&#x6CA1;&#x6709;&#x7559;&#x767D;&#xFF0C;&#x7AD9;&#x6EE1;&#x624B;&#x673A;&#x5BBD;&#x5EA6;
&#x539F;&#x56E0;&#xFF1A;
    1&#xFF09;&#x624B;&#x673A;&#x89C6;&#x53E3;&#x6BD4;&#x8F83;&#x5C0F;&#xFF0C;&#x5982;&#x679C;&#x518D;&#x6709;&#x7559;&#x767D;&#x975E;&#x5E38;&#x96BE;&#x770B;
    2&#xFF09;&#x624B;&#x673A;APP&#x57FA;&#x672C;&#x90FD;&#x662F;&#x6CBE;&#x6EE1;&#x5C4F;&#x5E55;&#x7684;&#xFF0C;&#x4E00;&#x822C;&#x60C5;&#x51B5;&#x6CA1;&#x6709;&#x5DE6;&#x53F3;&#x7A7A;&#x767D;&#xFF0C;&#x4F46;&#x662F;&#x6CA1;&#x6709;&#x7248;&#x5FC3;&#xFF0C;&#x5BF9;&#x6211;&#x4EEC;&#x7684;&#x5E03;&#x5C40;&#x5FFD;&#x60A0;&#x5F88;&#x5927;&#x7684;&#x5F71;&#x54CD;&#xFF0C;&#x5E03;&#x5C40;&#x6CA1;&#x6709;&#x529E;&#x6CD5;&#x7ED9;&#x56FA;&#x5B9A;&#x503C;
    &#x624B;&#x673A;&#x6CA1;&#x6709;&#x7248;&#x5FC3;&#xFF0C;&#x89C6;&#x53E3;&#x5404;&#x4E0D;&#x76F8;&#x540C;&#xFF0C;&#x6240;&#x4EE5;&#x505A;&#x624B;&#x673A;&#x5F00;&#x53D1;&#x5C3D;&#x53EF;&#x80FD;&#x4F7F;&#x7528;&#x767E;&#x5206;&#x6BD4;&#x5E03;&#x5C40;&#xFF0C;&#x6BCF;&#x4E00;&#x4E2A;&#x5143;&#x7D20;&#x90FD;&#x4F1A;&#x6839;&#x636E;&#x5C4F;&#x5E55;&#x7684;&#x5BBD;&#x5EA6;&#x53D8;&#x5316;&#x800C;&#x53D8;&#x5316;
2&#xFF0C;&#x767E;&#x5206;&#x6BD4;&#x5E03;&#x5C40;
    &#x5982;&#x679C;&#x4F7F;&#x7528;&#x767E;&#x5206;&#x6BD4;width&#xFF0C;&#x90A3;&#x4E48;&#x6307;&#x7684;&#x662F;&#x7236;&#x5143;&#x7D20;width&#x7684;&#x767E;&#x5206;&#x4E4B;&#x51E0;&#xFF0C;&#x6CA1;&#x6709;&#x7236;&#x5143;&#x7D20;&#x5C31;&#x53C2;&#x7167;body
    &#x5982;&#x679C;&#x4F7F;&#x7528;&#x767E;&#x5206;&#x6BD4;&#x5199;height&#xFF0C;&#x90A3;&#x4E48;&#x6307;&#x7684;&#x662F;&#x7236;&#x5143;&#x7D20;&#x7684; height&#x7684;&#x767E;&#x5206;&#x4E4B;&#x51E0;
    &#x5982;&#x679C;&#x4F7F;&#x7528;&#x767E;&#x5206;&#x6BD4;&#x5199;padding&#xFF0C;&#x90A3;&#x4E48;&#x6307;&#x7684;&#x662F;&#x7236;&#x5143;&#x7D20;&#x7684;width&#x7684;&#x767E;&#x5206;&#x4E4B;&#x51E0;&#xFF0C;&#x65E0;&#x8BBA;&#x662F;&#x6C34;&#x5E73;&#x7684;&#x8FD8;&#x662F;&#x5782;&#x76F4;&#x7684;&#xFF0C;&#x90FD;&#x662F;&#x4EE5;&#x7236;&#x5143;&#x7D20;&#x7684;width&#x4E3A;&#x51C6;
    &#x5982;&#x679C;&#x4F7F;&#x7528;&#x767E;&#x5206;&#x6BD4;&#x5199;margin&#xFF0C;&#x90A3;&#x4E48;&#x6307;&#x7684;&#x662F;&#x7236;&#x5143;&#x7D20;&#x7684;width&#x4E3A;&#x51C6;&#xFF0C;&#x65E0;&#x8BBA;&#x6C34;&#x5E73;&#x8FD8;&#x662F;&#x5782;&#x76F4;&#xFF0C;&#x90FD;&#x662F;&#x7236;&#x5143;&#x7D20;&#x7684;width&#x4E3A;&#x51C6;
    &#x4F46;&#x662F;&#x4E0D;&#x80FD;&#x4F7F;&#x7528;&#x767E;&#x5206;&#x6BD4;&#x5199;border
</code></pre>
<p><strong>&#x767E;&#x5206;&#x6BD4;&#x5E03;&#x5C40;</strong></p>
<pre><code class="lang-html">1&#xFF0C;&#x76F8;&#x5BF9;&#x4E8E;&#x8C01;
&#x601D;&#x7EF4;&#x7EBF;&#xFF1A;
    &#x624B;&#x673A;&#x5C4F;&#x5E55;&#x5C0F;--&gt; &#x4E0D;&#x8981;&#x7559;&#x767D;--&gt; &#x6491;&#x6EE1;&#x9875;&#x9762;--&gt; &#x89C6;&#x53E3;&#x5BBD;&#x5EA6;&#x4E0D;&#x540C;--&gt; &#x4E0D;&#x80FD;&#x4F7F;&#x7528;px&#x56FA;&#x5B9A;--&gt;&#x4F7F;&#x7528;&#x767E;&#x5206;&#x6BD4;&#x5E03;&#x5C40;
    &#x767E;&#x5206;&#x6BD4;&#x5E03;&#x5C40;&#x4E5F;&#x5C31;&#x505A;&#x6D41;&#x5F0F;&#x5E03;&#x5C40;&#xFF0C;&#x5F39;&#x6027;&#x76D2;&#x5B50;&#x5E03;&#x5C40;
2&#xFF0C;css3&#x5F39;&#x6027;&#x76D2;&#x5B50;&#x5C5E;&#x6027;   display&#xFF1A;-webkit-box&#xFF1B;
    &#x5982;&#x679C;&#x8BA9;&#x4E09;&#x4E2A;&#x76D2;&#x5B50;&#x6309;&#x7167;1:2:3&#x6765;&#x8BBE;&#x7F6E;&#x5BBD;&#x5EA6;&#xFF0C;name&#x6BCF;&#x4E2A;&#x76D2;&#x5B50;&#x5E94;&#x8BE5;&#x7ED9;&#x591A;&#x5C11;&#x767E;&#x5206;&#x6BD4;&#xFF1F;
    16.666%   33.3333%   50%
    css3,&#x63A8;&#x51FA;&#x4E00;&#x4E2A;&#x65B0;&#x5C5E;&#x6027;display&#x5C5E;&#x6027;&#x6709;&#x4E00;&#x4E2A;&#x65B0;&#x7684;&#x503C;&#xFF1A;box&#xFF0C;&#x517C;&#x5BB9;&#x8FD8;&#x6709;&#x4E00;&#x5B9A;&#x95EE;&#x9898;&#xFF0C;&#x5C3D;&#x91CF;&#x52A0;&#x4E0A;-webkit-&#xFF0C;&#x52A0;&#x4E0A;&#x8FD9;&#x4E2A;&#x5C5E;&#x6027;&#x4E4B;&#x540E;&#xFF0C;&#x8FD9;&#x4E2A;&#x5143;&#x7D20;&#x7684;&#x6240;&#x6709;&#x513F;&#x5B50;&#x5C31;&#x662F;&#x5F39;&#x6027;&#x5E03;&#x5C40;&#x4E86;&#xFF0C;&#x513F;&#x5B50;&#x4EEC;&#x4E0D;&#x9700;&#x8981;&#x8BBE;&#x7F6E;float&#xFF1A;left&#xFF0C;&#x80FD;&#x591F;&#x9ED8;&#x8BA4;&#x5E76;&#x6392;&#x6392;&#x5217;&#xFF0C;&#x901A;&#x8FC7;&#x8BBE;&#x7F6E;-webkit-box-flex&#xFF1A;num&#xFF1B;&#x6765;&#x8BBE;&#x7F6E;&#x6240;&#x5360;&#x6BD4;&#x4F8B;
3&#xFF0C;css3&#x65B0;&#x7684;&#x76D2;&#x5B50;&#x6A21;&#x578B;box-sizing&#xFF1A;border-box&#xFF1B;
    box-sizing&#x5C5E;&#x6027;&#x5141;&#x8BB8;&#x4F60;&#x4EE5;&#x7279;&#x5B9A;&#x7684;&#x65B9;&#x5F0F;&#x5B9A;&#x4E49;&#x5339;&#x914D;&#x67D0;&#x4E2A;&#x533A;&#x57DF;&#x7684;&#x7279;&#x5B9A;&#x5143;&#x7D20;
    box-sizing&#x5C31;&#x662F;&#x76D2;&#x5B50;&#x7684;&#x5C3A;&#x5BF8;&#xFF0C;&#x8FD9;&#x662F;&#x5C5E;&#x6027;&#x5B9A;&#x4E49;&#x4E86;&#x4F60;&#x8BBE;&#x7F6E;&#x7684;width&#xFF0C;height&#x503C;&#x7684;&#x662F;&#x4EC0;&#x4E48;&#x5BBD;&#x5EA6;&#xFF0C;&#x9AD8;&#x5EA6;
    &#x4E00;&#x822C;&#x6765;&#x8BF4;width&#xFF0C;height&#x6307;&#x7684;&#x662F;&#x5185;&#x5BB9;&#x5BBD;&#x5EA6;&#x548C;&#x9AD8;&#x5EA6;&#xFF0C;&#x4F46;&#x662F;&#x52A0;&#x4E0A;  box-sizing&#xFF1A;border-box&#xFF1B;&#x8FD9;&#x65F6;width&#x548C;height&#x503C;&#x7684;&#x662F;border&#x5916;&#x4FA7;&#x6784;&#x6210;&#x7684;&#x76D2;&#x5B50;&#x7684;&#x5BBD;&#x5EA6;&#x548C;&#x9AD8;&#x5EA6;
    &#x5728;&#x4E4B;&#x524D;css3&#x9000;=&#x63A8;&#x51FA;&#x4E86;&#x4E00;&#x4E2A;&#x53EF;&#x4EE5;&#x7528;&#x4E8E;&#x8BA1;&#x7B97;&#x7684;&#x5C5E;&#x6027;&#xFF1A;calc&#xFF0C;&#x53EF;&#x4EE5;&#x7528;&#x4E8E;&#x6570;&#x5B57;&#x6216;&#x8005;&#x767E;&#x5206;&#x6BD4;&#x7684;&#x8BA1;&#x7B97;
    width&#xFF1A;calc&#xFF08;50% - 10px&#xFF09;&#xFF1B;&#xFF08;&#x76F8;&#x5F53;&#x4E8E;&#x88C1;&#x526A;&#xFF09;
    calc &#x53EA;&#x80FD;&#x505A;&#x52A0;&#x51CF;&#x8FD0;&#x7B97;&#xFF0C;&#x5E76;&#x4E14;&#x5FC5;&#x987B;&#x5E26;&#x7740;&#x5355;&#x4F4D;&#xFF0C;&#x7C7B;&#x4F3C;&#x4E00;&#x4E2A;&#x51FD;&#x6570;
    &#x73B0;&#x5728;&#x5F88;&#x5C11;&#x4EBA;&#x4F7F;&#x7528;&#xFF0C;&#x4E00;&#x822C;&#x4F7F;&#x7528;box-sizing&#xFF1A;border-box&#xFF1B;&#x4E00;&#x62DB;&#x9C9C;&#xFF0C;&#x5403;&#x904D;&#x5929;
4&#xFF0C;&#x56FA;&#x6BD4;&#x56FA;     
    1&#xFF09;&#x7EDD;&#x5BF9;&#x5B9A;&#x4F4D;&#x65B9;&#x6CD5;&#x8FDB;&#x884C;&#x56FA;&#x6BD4;&#x56FA;&#x5E03;&#x5C40;
    2&#xFF09;display&#xFF1A;box  &#x5C5E;&#x6027;
5&#xFF0C;min-width&#x548C;max-width
     &#x6309;&#x767E;&#x5206;&#x6BD4;&#x5E03;&#x5C40;&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x8FDB;&#x884C;&#x4E00;&#x4E2A;&#x9650;&#x5236;
</code></pre>
<h3 id="width">width</h3>
<blockquote>
<p>width&#x88AB;&#x7528;&#x6765;&#x5B9A;&#x4E49;layout viewport&#x7684;&#x5BBD;&#x5EA6;&#xFF0C;
&#x5982;&#x679C;&#x4E0D;&#x6307;&#x5B9A;&#x8BE5;&#x5C5E;&#x6027;&#xFF08;&#x6216;&#x8005;&#x79FB;&#x9664;viewport meta&#x6807;&#x7B7E;&#xFF09;&#xFF0C;&#x5219;layout viewport&#x5BBD;&#x5EA6;&#x4E3A;&#x5382;&#x5546;&#x9ED8;&#x8BA4;&#x503C;&#x3002;&#x5982;&#xFF1A;iPhone&#x4E3A;980px&#xFF1B;</p>
<pre><code class="lang-html">&#x4E3E;&#x4E2A;&#x4F8B;&#x5B50;&#xFF1A;
<span class="hljs-tag">&lt;<span class="hljs-title">meta</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">&quot;viewport&quot;</span> <span class="hljs-attribute">content</span>=<span class="hljs-value">&quot;width=device-width&quot;</span> /&gt;</span>
</code></pre>
<pre><code>&#x6B64;&#x65F6;&#x7684;layout viewport&#x5C06;&#x6210;&#x4E3A;ideal viewport&#xFF0C;&#x56E0;&#x4E3A;layout viewport&#x5BBD;&#x5EA6;&#x4E0E;&#x8BBE;&#x5907;&#x89C6;&#x89C9;&#x89C6;&#x53E3;&#x5BBD;&#x5EA6;&#x4E00;&#x81F4;&#x4E86;&#x3002;
&#x9664;&#x4E86;width&#x4E4B;&#x5916;&#xFF0C;&#x8FD8;&#x6709;&#x4E00;&#x4E2A;&#x5C5E;&#x6027;&#x5B9A;&#x4E49;&#x4E5F;&#x80FD;&#x5B9E;&#x73B0;ideal viewport&#xFF0C;&#x90A3;&#x5C31;&#x662F;initial-scale&#x3002;        
</code></pre></blockquote>
<h3 id="height">height</h3>
<blockquote>
<p>&#x4E0E;width&#x7C7B;&#x4F3C;&#xFF0C;&#x4F46;&#x5B9E;&#x9645;&#x4E0A;&#x5374;&#x4E0D;&#x5E38;&#x7528;&#xFF0C;&#x56E0;&#x4E3A;&#x6CA1;&#x6709;&#x592A;&#x591A;&#x7684;use case&#x3002;</p>
</blockquote>
<h3 id="initialscale">initial-scale</h3>
<pre><code class="lang-html">&#x5982;&#x679C;&#x60F3;&#x9875;&#x9762;&#x9ED8;&#x8BA4;&#x4EE5;&#x67D0;&#x4E2A;&#x6BD4;&#x4F8B;&#x653E;&#x5927;&#x6216;&#x8005;&#x7F29;&#x5C0F;&#x7136;&#x540E;&#x5448;&#x73B0;&#x7ED9;&#x7528;&#x6237;&#xFF0C;&#x90A3;&#x4E48;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x5B9A;&#x4E49;initial-scale&#x6765;&#x5B8C;&#x6210;&#x3002;

initial-scale&#x7528;&#x4E8E;&#x6307;&#x5B9A;&#x9875;&#x9762;&#x7684;&#x521D;&#x59CB;&#x7F29;&#x653E;&#x6BD4;&#x4F8B;&#xFF0C;&#x5047;&#x5B9A;&#x4F60;&#x8FD9;&#x6837;&#x5B9A;&#x4E49;&#xFF1A;

<span class="hljs-tag">&lt;<span class="hljs-title">meta</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">&quot;viewport&quot;</span> <span class="hljs-attribute">content</span>=<span class="hljs-value">&quot;initial-scale=2&quot;</span> /&gt;</span>
&#x90A3;&#x4E48;&#x7528;&#x6237;&#x5C06;&#x4F1A;&#x770B;&#x5230;2&#x500D;&#x5927;&#x5C0F;&#x7684;&#x9875;&#x9762;&#x5185;&#x5BB9;&#x3002;

&#x5728;&#x8BF4;width&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x6211;&#x4EEC;&#x8BF4;&#x5230;initial-scale&#x4E5F;&#x80FD;&#x5B9E;&#x73B0;ideal viewport&#xFF0C;&#x662F;&#x7684;&#xFF0C;&#x4F60;&#x53EA;&#x9700;&#x8981;&#x8FD9;&#x6837;&#x505A;&#xFF0C;&#x4E5F;&#x53EF;&#x4EE5;&#x5F97;&#x5230;&#x5B8C;&#x7F8E;&#x89C6;&#x53E3;&#xFF1A;

<span class="hljs-tag">&lt;<span class="hljs-title">meta</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">&quot;viewport&quot;</span> <span class="hljs-attribute">content</span>=<span class="hljs-value">&quot;initial-scale=1&quot;</span> /&gt;</span>
</code></pre>
<h3 id="maximumscale">maximum-scale</h3>
<pre><code class="lang-html">&#x5728;&#x79FB;&#x52A8;&#x7AEF;&#xFF0C;&#x4F60;&#x53EF;&#x80FD;&#x4F1A;&#x8003;&#x8651;&#x7528;&#x6237;&#x6D4F;&#x89C8;&#x4E0D;&#x4FBF;&#xFF0C;&#x7136;&#x540E;&#x7ED9;&#x4E88;&#x7528;&#x6237;&#x653E;&#x5927;&#x9875;&#x9762;&#x7684;&#x6743;&#x5229;&#xFF0C;&#x4F46;&#x540C;&#x65F6;&#x53C8;&#x5E0C;&#x671B;&#x662F;&#x5728;&#x4E00;&#x5B9A;&#x8303;&#x56F4;&#x5185;&#x7684;&#x653E;&#x5927;&#xFF0C;&#x8FD9;&#x65F6;&#x5C31;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;maximum-scale&#x6765;&#x8FDB;&#x884C;&#x7EA6;&#x675F;&#x3002;

maximum-scale&#x7528;&#x4E8E;&#x6307;&#x5B9A;&#x7528;&#x6237;&#x80FD;&#x591F;&#x653E;&#x5927;&#x7684;&#x6BD4;&#x4F8B;&#x3002;

&#x4E3E;&#x4E2A;&#x4F8B;&#x5B50;&#x6765;&#x8BB2;&#xFF1A;

<span class="hljs-tag">&lt;<span class="hljs-title">meta</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">&quot;viewport&quot;</span> <span class="hljs-attribute">content</span>=<span class="hljs-value">&quot;initial-scale=1,maximum-scale=5&quot;</span> /&gt;</span>
&#x5047;&#x8BBE;&#x9875;&#x9762;&#x7684;&#x9ED8;&#x8BA4;&#x7F29;&#x653E;&#x503C;initial-scale&#x662F;1&#xFF0C;&#x90A3;&#x4E48;&#x7528;&#x6237;&#x6700;&#x7EC8;&#x80FD;&#x591F;&#x5C06;&#x9875;&#x9762;&#x653E;&#x5927;&#x5230;&#x8FD9;&#x4E2A;&#x521D;&#x59CB;&#x9875;&#x9762;&#x5927;&#x5C0F;&#x7684;5&#x500D;&#x3002;
</code></pre>
<h3 id="minimumscale">minimum-scale</h3>
<blockquote>
<p>&#x7C7B;&#x4F3C;maximum-scale&#x7684;&#x63CF;&#x8FF0;&#xFF0C;&#x4E0D;&#x8FC7;minimum-scale&#x662F;&#x7528;&#x6765;&#x6307;&#x5B9A;&#x9875;&#x9762;&#x7F29;&#x5C0F;&#x6BD4;&#x4F8B;&#x7684;&#x3002;<br>&#x901A;&#x5E38;&#x60C5;&#x51B5;&#x4E0B;&#xFF0C;&#x4E3A;&#x4E86;&#x6709;&#x66F4;&#x597D;&#x5730;&#x4F53;&#x9A8C;&#xFF0C;&#x4E0D;&#x4F1A;&#x5B9A;&#x4E49;&#x8BE5;&#x5C5E;&#x6027;&#x7684;&#x503C;&#x6BD4;1&#x66F4;&#x5C0F;&#xFF0C;&#x56E0;&#x4E3A;&#x90A3;&#x6837;&#x9875;&#x9762;&#x5C06;&#x53D8;&#x5F97;&#x96BE;&#x4EE5;&#x9605;&#x8BFB;&#x3002;</p>
</blockquote>
<h3 id="userscalable">user-scalable</h3>
<pre><code class="lang-html">&#x5982;&#x679C;&#x4F60;&#x4E0D;&#x60F3;&#x9875;&#x9762;&#x88AB;&#x653E;&#x5927;&#x6216;&#x8005;&#x7F29;&#x5C0F;&#xFF0C;&#x901A;&#x8FC7;&#x5B9A;&#x4E49;user-scalable&#x6765;&#x7EA6;&#x675F;&#x7528;&#x6237;&#x662F;&#x5426;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x624B;&#x52BF;&#x5BF9;&#x9875;&#x9762;&#x8FDB;&#x884C;&#x7F29;&#x653E;&#x5373;&#x53EF;&#x3002;

&#x8BE5;&#x5C5E;&#x6027;&#x7684;&#x9ED8;&#x8BA4;&#x503C;&#x4E3A;yes&#xFF0C;&#x5373;&#x53EF;&#x88AB;&#x7F29;&#x653E;&#xFF08;&#x5982;&#x679C;&#x4F7F;&#x7528;&#x9ED8;&#x8BA4;&#x503C;&#xFF0C;&#x8BE5;&#x5C5E;&#x6027;&#x53EF;&#x4EE5;&#x4E0D;&#x5B9A;&#x4E49;&#xFF09;&#xFF1B;&#x5F53;&#x7136;&#xFF0C;&#x5982;&#x679C;&#x4F60;&#x7684;&#x5E94;&#x7528;&#x4E0D;&#x6253;&#x7B97;&#x8BA9;&#x7528;&#x6237;&#x62E5;&#x6709;&#x7F29;&#x653E;&#x6743;&#x9650;&#xFF0C;&#x53EF;&#x4EE5;&#x5C06;&#x8BE5;&#x503C;&#x8BBE;&#x7F6E;&#x4E3A;no&#x3002;

&#x4F7F;&#x7528;&#x65B9;&#x6CD5;&#x5982;&#x4E0B;&#xFF1A;

<span class="hljs-tag">&lt;<span class="hljs-title">meta</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">&quot;viewport&quot;</span> <span class="hljs-attribute">content</span>=<span class="hljs-value">&quot;user-scalable=no&quot;</span> /&gt;</span>
</code></pre>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../../lesson/viewport/20170814.html" class="navigation navigation-prev " aria-label="Previous page: viewport"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../../lesson/viewport/20170815.html" class="navigation navigation-next " aria-label="Next page: 移动端项目"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../../gitbook/app.js"></script>

    
    <script src="../../gitbook/plugins/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-livereload/plugin.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"expandable-chapters-small":{},"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"livereload":{}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
